<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="/css/start/jquery-ui-1.8.21.custom.css" rel="Stylesheet" />	
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.21.custom.min.js"></script>
<script type="text/javascript" src="/js/jquery.leanModal.min.js"></script>
<title>Payroll Wizard</title>
<link href="/css/template.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	$(function() {
		$( "#date_begin" ).datepicker({ dateFormat: "yy-mm-dd",firstDay: 1 });
		$( "#date_end" ).datepicker({ dateFormat: "yy-mm-dd"});
		
	});
	function check() {
		$.each($("input[name='checkbox1[]']:checked"), function() {
			$('#myCheckbox').attr('checked', false);
			});
	}
</script>
<style type="text/css">
#table1{
	position:absolute;
    top: 100px;
    left: 10px;
}

#table2{
	position:absolute;
    top: 100px;
    left: 250px;
}

#button{
	position:relative;
    top: 450px;
    left: 10px;
}
</style>
</head>

<body style="font-family:Arial, Helvetica, sans-serif">
<h1>Payroll Wizard Select List</h1>

<form action = "" method = "post" enctype="multipart/form-data">
<?php $staffInfo = new Model_DbTable_Roster_Stafflogindetail();
$arrType = unserialize(PAYROLL_TYPE);?>


<table border="1" cellspacing="5" cellpadding="3" style="font-size:13px;">
	<tr>
		<th>Name</th>
		<th>Package</th>
		<th>Package Staff List</th>
		<th>Cash Staff List</th>
		
	</tr>		
		<?php foreach($this->staffList as $k2 => $v2){
			if($v2['leave']!= 9){
			$staffDetail = $staffInfo->getDetail($v2['id_staff']); ?>
		<tr>	
			<td><?php echo ucwords(Model_EncryptHelper::getSslPassword($staffDetail['n']));
    				  echo ucwords(" (".$staffDetail['ni'].")");?></td>
    		<td><?php echo $arrType[$v2['id_package']][1];?></td>
    		<td><input type = "checkbox" id = "checkbox1[<?php echo $v2['id_staff'];?>]" name = "checkbox1[<?php echo $v2['id_staff'];?>]" <?php if($v2['id_package'] == 1 || $v2['id_package'] == 3 || $v2['id_package'] == 4 || $v2['id_package'] == 6 || $v2['id_package'] == 7 || $v2['id_package'] == 8){ ?> checked<?php }?> ></input><input type = "hidden" id = "packstaff[<?php echo $v2['id_staff'];?>]" name = "packstaff[<?php echo $v2['id_staff'];?>]" value = "<?php echo $v2['id_staff'];?>"></input></td>
    		<td><input type = "checkbox" id = "checkbox2[<?php echo $v2['id_staff'];?>]" name = "checkbox2[<?php echo $v2['id_staff'];?>]" <?php if($v2['id_package'] == 2 || $v2['id_package'] == 5){ ?> checked<?php }?>></input><input type = "hidden" id = "cashstaff[<?php echo $v2['id_staff'];?>]" name = "cashstaff[<?php echo $v2['id_staff'];?>]" value = "<?php echo $v2['id_staff'];?>"></input></td>
		</tr>
		<?php } 
			}?>
</table>

	<br/>
	<input type = "submit" id = "next" name = "next" value = "Check Package Roster" ></input>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input type = "submit" id = "export" name = "export" value = "Export Cash Roster" ></input>
</form>
</body>
</html>
